package com.security.securityproject.service.serviceImpl;

import com.security.securityproject.entity.SysUser;
import com.security.securityproject.mapper.SysUserMapper;
import com.security.securityproject.service.SysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author huangkf
 * @version 1.0
 * @date 2022/11/29:17:27
 * @description 用户接口业务实现类
 */

@Service
public class SysUserServiceImpl implements SysUserService {


    @Autowired
    private SysUserMapper  sysUserMapper;
    @Override
    public List<SysUser> findSysUsers() {

        List<SysUser> sysUsers = sysUserMapper.getSysUsers();
        return sysUsers;
    }

    @Override
    public SysUser getByUserName(String userName) {

        SysUser userInfo = sysUserMapper.findByUserName(userName);

        return userInfo;
    }

    @Override
    public SysUser findByIdAndName(Integer userId, String name) {

        SysUser byIdAndName = sysUserMapper.findByIdAndName(userId, name);
        return byIdAndName;
    }
}
